package com.xiaolin.web.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xiaolin.web.entity.User;
import com.xiaolin.web.mapper.UserMapper;
import com.xiaolin.web.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Detail detail
 * @Author MyPC
 * @Date 2020/9/29
 * @Version 1.0
 */
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    UserMapper userMapper;
    @Override
    public User selectByName(String name) {
        QueryWrapper<User> wrapper=new QueryWrapper<>();
        wrapper.eq("username",name);
        return userMapper.selectOne(wrapper);
    }
}
